package com.railway.servlet;

import java.io.IOException;
import java.util.Map;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.railway.service.IntegraService;
import com.railway.service.impl.IntegraServiceImpl;
import com.railway.util.JSONUtil;

/**用于积分的查询
 * Servlet implementation class IntegraServle
 */
@WebServlet("/IntegraServle.do")
public class IntegraServle extends HttpServlet {
	
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		request.setCharacterEncoding("UTF-8");
		Map<String,String[]> map = request.getParameterMap();
		IntegraService is = new IntegraServiceImpl();
		Map m = (Map) is.selectIntegra(map);
		JSONUtil.responJSOn(response, m);
	}

}
